 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="vi-vn" lang="vi-vn">

<head>
  <base href="#" />
  <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  <meta name="robots" content="index, follow" />
  <meta name="keywords" content="quà lưu niệm,qua luu niem,quà,qua,lưu niệm,luu niem,shop lưu niệm,shop luu niem,shop quà lưu niệm,shop qua luu niem,Cửa hàng lưu niệm, cua hang luu niem,quà tặng,qua tang" />
  <meta name="description" content="xxxxx" />
  <meta name="generator" content="Joomla! 1.5 - Open Source Content Management" />
  <title>Quà lưu niệm</title>
  
  <!--  Zoom iamges when overMouse -->
          <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
        <script type="text/javascript" src="templates/ja_zeolite/js/stickytooltip.js"></script>
        <link rel="stylesheet" type="text/css" href="templates/ja_zeolite/js/stickytooltip.css" />
  <!-- -->
  
  <link href="/index.php?format=feed&amp;type=rss" rel="alternate" type="application/rss+xml" title="RSS 2.0" />
  <link href="/index.php?format=feed&amp;type=atom" rel="alternate" type="application/atom+xml" title="Atom 1.0" />
  <link href="templates/ja_zeolite/favicon.ico" rel="shortcut icon" type="image/x-icon" />
  <link rel="stylesheet" href="templates/ja_zeolite/css/ja.contentscroll.css" type="text/css" />
  <link rel="stylesheet" href="templates/ja_zeolite/css/ja.slideshow.css" type="text/css" />
  <script type="text/javascript" src="media/system/js/mootools.js"></script>
  <script type="text/javascript" src="media/system/js/caption.js"></script>


<link rel="stylesheet" href="templates/system/css/system.css" type="text/css" />
<link rel="stylesheet" href="templates/system/css/general.css" type="text/css" />
<link rel="stylesheet" href="templates/ja_zeolite/css/template.css" type="text/css" />
<link rel="stylesheet" href="templates/ja_zeolite/css/typo.css" type="text/css" />
<link rel="stylesheet" href="templates/ja_zeolite/css/ja.vm.css" type="text/css" />

<script language="javascript" type="text/javascript">
	var siteurl = 'url xxxxx';
	var tmplurl = 'templates/ja_zeolite';
</script>

<script language="javascript" type="text/javascript" src="templates/ja_zeolite/js/ja.script.js"></script>
<!-- js for dragdrop -->

<!-- Menu head -->
			<link href="templates/ja_zeolite/ja_menus/ja_splitmenu/ja.splitmenu.css" rel="stylesheet" type="text/css" />
			<link href="templates/ja_zeolite/css/colors/default.css" rel="stylesheet" type="text/css" />

</head>

<body id="bd" class=" wide fs3" >
			
<script type="text/javascript" src="templates/ja_zeolite/js/wz_tooltip.js"></script>			
<?php
	
	require_once('model/model.php');
	require_once('model/ParamInOut.php');
	require_once('ViewConfig.php');
	
	$md = new Model();
	
	// phan trang sp
	$pageSize = _PageSize;
	
	if(isset($_GET['pages']) && (int)$_GET['pages']>=0)
	{
		$pages = $_GET['pages'];
	}
	else
	{
		$count = $md->CountProduct(-1,1);
		
		
		if($count > $pageSize)
		{
			$pages = ceil($count/$pageSize);
		}
		else
		{
			$pages =1;
		}
	}
	$start = (isset($_GET['start']) && (int)$_GET['start'] >=0) ? $_GET['start'] :0;
	$data = $md->GetProduct(-1,$pageSize,$start,1);

	$Name ="Sản phẩm mới";
?>
<table class="blog hoa đẹp" cellpadding="0" cellspacing="0">

<tr>
	<td valign="top">
		<table width="100%"  cellpadding="0" cellspacing="0">
        
		<tr>
						<td valign="top" width="100%" class="article_column">
                        
                        
   <div id="ja-slider">
          		<div class="moduletable">
					<h3><?php echo $Name; ?> </h3>                 
 <span><hr /></span>                       

<div id="ja-contentslider" class="clearfix" >


<!-- begin loop -->

<!--  Begin rows -->
<?php

	if(count($data)==0)
	{
		echo "<div id=ja-contentslider-center' style='width: 100%;height: 200px;'>";
  		echo "<div style='display:block;width:100%;height:190px;'>";
		echo "data not found";	
		echo "</div>";
		echo "</div>";
		
		$pages =0;
	}
	
	
	$count=0;
	while($count<count($data))
	{
?>
<div id="ja-contentslider-center" style="width: 100%;height: 200px;">
  <div style="display:block;width:100%;height:190px;">
<?php
	for($i=0;$i<3;$i++)
		{
			$obj = new GetProductResponse();
			$obj = $data[$count];
			if(isset($obj))
			{
?>
<!--  Begin elemnet -->
<div class="content_element" style="float:left; width:145px;height:190px;padding-left: 10px;padding-left: 10px; ">
	    <div class="ja_slideimages clearfix">
         <div class="img_product">
         	<?php if((int)$obj->New == 1){ ?>
         <img src="<?php echo _PathImageIcon; ?>" style="position:  absolute;float: right;margin-left: -5px;margin-top: -5px;" width="50" height="50">
        	<?php } //end if(New) ?>
        

         <a href="?idsp=<?php echo $obj->IdProduct?>" title="<?php echo $obj->ProductName; ?>" onMouseOver="Tip('<img src=\'<?php echo _PathImage.$obj->UrlIamge ?>\' border=\'0\' height=\'250\' width=\'250\'>', WIDTH, 250, BGCOLOR, '#FFFFFF', TITLE, '')" onMouseOut="UnTip()">

         <img src="<?php echo _PathImage.$obj->UrlIamge ?>" alt="<?php echo $obj->ProductName; ?>" width="135" height="140"/>
                 
                 </a>     
              
         </div>
         </div>
         <br />
	<div class="ja_slidetitle" >
    <a href="?idsp=<?php echo $obj->IdProduct?>"  > 
	<?php echo $obj->ProductName; ?> </a>
    </div>
	<div class="ja_slidetitle"> <a href="?idsp=<?php echo $obj->IdProduct?>" style="color:#cc0000">Mã: <?php echo $obj->ProductNo; ?> </a></div>
    <div class="pagination">
    <!-- Chi tiet -->
     </div>
</div>
<!-- end element -->
		<?php
				$count++;
				} // end if(isset($obj))
			} // end for()
		?>

    </div>
</div>
<!--  end rows -->
 <span class="article_separator">&nbsp;</span>
 <?php
	} // end while()
 ?>
<!-- end loop -->


				</td>
				</tr> 
		</table>
	</td>
</tr>
<tr>
	<td valign="top" align="center">
		<ul class="pagination">
              
<?php
	
	// phan trang

		echo"<li>&laquo;</li><li><span><a href=?idmn=2&start=0&pages=".$pages."> Bắt đầu</a></span>&nbsp;</li>";

	

	$index=1;
	for($i=0; $i<$pageSize*$pages; $i= $i+$pageSize)
	{
		
		if(isset($_GET['start']) && $i == $_GET['start'])
		{
			echo "<li>&nbsp;<strong>".$index."</strong>&nbsp;</li>";
		}
		else
		{
			echo "<li>&nbsp;<strong><a href='?idmn=2&start=".$i."&pages=".$pages."'>".$index."</a></strong>&nbsp;</li>";
		}	
		$index++;
	}
	
	$end =($pages-1)*$pageSize;
	echo "<li>&nbsp;<strong><a href=?idmn=2&start=".$end."&pages=".$pages.">Cuối</a></strong>&nbsp;</li><li>&raquo;</li>"
?>

        
        
        
        </ul>	
       </td>
</tr>
<tr>
	
    <td valign="top" align="center">Trang <?php echo (isset($_GET['start']))? $start/$pageSize+1 : 1; ?> trong tổng số <?php echo $pages; ?> trang	</td>
</tr>
</table>

</body>

</html>


